<?php
/*
  $Id: whats_new.php,v 1.31 2003/02/10 22:31:09 hpdl Exp $

  osCommerce, Open Source E-Commerce Solutions
  http://www.oscommerce.com

  Copyright (c) 2003 osCommerce

  Released under the GNU General Public License
*/

 $customers_query = tep_db_query("select count(*) as count from " . TABLE_CUSTOMERS);
 $customers = tep_db_fetch_array($customers_query);
 $products_query = tep_db_query("select count(*) as count from " . TABLE_PRODUCTS . " where products_status = '1'");
 $products = tep_db_fetch_array($products_query);

?>

<!-- quick stats box begin -->
    <tr>
	<td>
<table class="tooltipBox" width="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<td>
			<img src="images/tick.gif" align="left" height="13" width="14">
			&nbsp;You are currently running the latest version of <br><u>BUYX Online.</u>&nbsp;(v1.0)
		</td>
</tr>
</table>
<table class="didyouKnowBox" cellpadding="0" cellspacing="0" width="100%">
	<tbody><tr>
		<td>
			<b>Did you know?</b> BUYX Online have a powerful Email Marketing application that you can use to have your customers subscribe to your marketing newsletters, add custom quotation forms to any of your pages, or use as a comments and suggestions application?
		</td>
	</tr>
</tbody></table>
<table width="100%" cellspacing="0" cellpadding="0"border="0">
<tr>
<td>
<div class="RightHeader">Quick Customer Search</div>
<div id="inset">
<div class="moduletable">
<form name="search" action="<?php echo DIR_WS_ADMIN; ?>customers.php" method="get">
<input name="search" maxlength="20" alt="search" class="inputbox" type="text" size="17" value="search customers.."  onblur="if(this.value=='') this.value='search customers..';" onfocus="if(this.value=='search customers..') this.value='';" />
</form>
</div>
</div>
<div id="end"></div>
<br>
<div id="left">
<div id="left_container" class="clearingfix">
<div class="RightHeader">Quick Product Search</div>
<div id="inset">
<div class="moduletable">
<form name="search" action="<?php echo DIR_WS_ADMIN; ?>categories.php" method="get">
<input name="search" maxlength="20" alt="search" class="inputbox" type="text" size="17" value="search products.."  onblur="if(this.value=='') this.value='search products..';" onfocus="if(this.value=='search products..') this.value='';" />
</form>
</div>
<div id="end"></div>
</div>
</td>
</tr>
</table>
<br>
<table cellspacing="0" cellpadding="0" width="100%" border="0">

	<tr>
		<td>
			<div class="RightHeader">Quick Stats</div>
				<ul style="margin-top:5px">
<?php
  $orders_status_query = tep_db_query("select orders_status_name, orders_status_id from " . TABLE_ORDERS_STATUS . " where language_id = '" . $languages_id . "'");
      while ($orders_status = tep_db_fetch_array($orders_status_query)) {
  $orders_pending_query = tep_db_query("select count(*) as count from " . TABLE_ORDERS . " where orders_status = '" . $orders_status['orders_status_id'] . "'");
  $orders_pending = tep_db_fetch_array($orders_pending_query);
  $orders_contents .= '<li><span class="HelpText" title="' . $orders_status['orders_status_name'] . ' orders"><a href="' . tep_href_link(FILENAME_ORDERS, 'selected_box=customers&status=' . $orders_status['orders_status_id']) . '">' . $orders_status['orders_status_name'] . '</a>: ' . $orders_pending['count'] . '</span><br /></li>';
    }
  print_r($orders_contents);
?>

				<li><span class="HelpText" title='Total customers registered with your store'>Total customers: <?php echo $customers['count']; ?></span><br /></li>

				<li><span class="HelpText" title='Total active products'>Total products:  <?php echo $products['count']; ?></span><br /></li>
				</ul>
		</td>
	</tr>

</table>
		</td>
    </tr>
<!-- 3am services box end -->					
